<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/browserplus-min.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/plupload.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/plupload.browserplus.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/plupload.html4.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/plupload.html5.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/plugins/plupload/jquery.json-2.4.min.js"></script>

<div class="db_left bl">
    <?php $this->load->view('medical/object/side_block'); ?>
</div>
    <div class="db_right bl">
        <div class="std_header auto_height">
            <div class="left">
                <strong>Thông tin bệnh</strong>
            </div>
        </div>
        <div id="disease_management">
            <form id="frm_disease_edit" enctype="multipart/form-data" method="POST" action="<?php echo $save_action; ?>">
                <?php $this->load->view('medical/disease/message'); ?>
                <input id="entity_id" type="hidden" name="id" value="<?php echo isset($disease->id) ? $disease->id : '' ; ?>" />
                <div class="clearfix auto_height mb_10 mt_10">
                    <button class="gray_btn " type="button" onclick="window.location = '<?php echo site_url('admin/medical/disease/index', true); ?>'"><span>Về danh sách</span></button>
                    <button class="gray_btn" type="submit" ><span>Lưu lại</span></button>
                    <button class="gray_btn" type="reset"><span>Nhập lại</span></button>
                    <?php if (isset($disease->id) && $has_privilege_delete) :?>
                    <button class="gray_btn delete_btn" type="button" action="<?php echo site_url('admin/medical/disease/delete/id/' . $disease->id, true); ?>" message="Bạn muốn xóa khoa này?" onclick="btn_util.active_delete(this)"><span>Xóa khoa</span></button>
                    <?php endif; ?>
                </div>

                <div id="tab_store" class="tab_container">
                    <ul class="ul_border_b_none">
                        <li id="active_general" ><a href="#tab_general"><span>Thông tin bệnh</span></a></li>
                        <li id="active_symptoms" ><a href="#tab_symptoms"><span>Triệu chứng thường gặp</span></a></li>
                        <li id="active_disease" ><a href="#tab_disease"><span>Bệnh liên quan</span></a></li>
                        <li id="active_related" ><a href="#tab_related"><span>Tin tức liên quan</span></a></li>
                        <li id="active_image" ><a href="#tab_image"><span>Ảnh và video</span></a></li>
                        <li id="active_seo" ><a href="#tab_seo"><span>Thông tin seo</span></a></li>
                    </ul>
                    <div class="active_div" id="tab_general" style="padding-top: 0px !important">
                        <div class="form_block" style="width: 60%;float: left;">
                            <div class="block_header">
                                Thông tin bài viết <?php if (!empty($article->id)) :?><strong>[<?php echo $article->title; ?>]</strong><?php endif; ?>
                            </div>
                            <div class="block_content">
                                <table cellpadding="0px" cellspacing="0px">
                                    <tr>
                                        <td class="frm_label">Tên bệnh(*)</td>
                                        <td class="frm_field">
                                            <input type="text" class="std_input required" name="data[name]" title="Tên bệnh không được để trống" value="<?php echo get_field($disease, 'name'); ?>" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Tên gọi khác</td>
                                        <td class="frm_field">
                                            <input type="text" class="std_input" title="Tên gọi khác" name="data[alter_name]"  value="<?php echo get_field($disease, 'alter_name'); ?>" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Bí danh</td>
                                        <td class="frm_field">
                                            <input type="text" class="std_input" title="Bí danh" name="data[alias]"  value="<?php echo get_field($disease, 'alias'); ?>" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Thuộc khoa</td>
                                        <td class="frm_field">
                                            <select name="data[department_id]">
                                                <option value="0">Chọn khoa</option>
                                                <?php foreach ($department as $dep) : ?>
                                                <option value="<?php echo $dep->id; ?>"  <?php if ($dep->id == get_field($disease, 'department_id')) :?>selected="selected" <?php endif; ?> ><?php echo $dep->name; ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Ảnh minh họa</td>
                                        <td class="frm_field">
                                            <?php $image = get_field($disease, 'image'); ?>
                                            <?php if (!empty($image)) :?>
                                            <a target="_blank" href="<?php echo render_src($image); ?>"><img src="<?php echo render_src($image); ?>" width="40px" style="vertical-align: middle; border: 2px solid #bbb" /></a>
                                            <?php endif; ?>
                                            <input type="file" name="data_image" />
                                            &nbsp;
                                            <input onclick="return admin_medical_parts.show_img_path(this.checked)" style="top: 2px; position: relative" type="checkbox" name="set_img_url" id="set_img_url" value="1" />
                                            <label for="set_img_url">Chọn đường dẫn ảnh</label>
                                            <div class="clearfix mt_10" id="wp_img_path" style="display: none">
                                                <input name="img_path" type="text" class="std_input" value="<?php echo $image; ?>" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Bệnh thường gặp</td>
                                        <td class="frm_field">
                                            <input type="checkbox" name="data[is_top]" id="is_top" value="1" style="top: 2px; position: relative" <?php if (isset($disease->is_top) && $disease->is_top == 1) :?> checked="checked" <?php endif; ?>/>
                                            <label for="is_top">Có</label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Hiển thị</td>
                                        <td class="frm_field">
                                            <select class="std_input" name="data[is_hidden]">
                                                <option value="1" <?php if (isset($disease->is_hidden) && $disease->is_hidden == 1) :?> selected="selected" <?php endif; ?>>Hiện</option>
                                                <option value="2" <?php if (isset($disease->is_hidden) && $disease->is_hidden == 2) :?> selected="selected" <?php endif; ?>>Ẩn</option>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Mô tả ngắn</td>
                                        <td class="frm_field">
                                            <textarea rows="" cols="" name="data[short_description]" title="Mô tả ngắn"><?php echo get_field($disease, 'short_description'); ?></textarea>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_field" colspan="2">
                                            <textarea title="Mô tả chi tiết" name="data[description]" class="editor"><?php echo get_field($disease, 'description'); ?></textarea>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="area_data_chk mt_40">
                            <span class="data_chk_title">Đối tượng thường gặp</span>
                            <?php foreach ($list_object as $obj) : ?>
                            <span class="span_chk"><input type="checkbox" name="object_ids[]" value="<?php echo $obj->id; ?>" <?php if (isset($season_ids[$obj->id])) :?>checked="checked" <?php endif; ?> id="object_<?php echo $obj->id; ?>" /><label for="object_<?php echo $obj->id; ?>" class="label_for"><?php echo $obj->name; ?></label></span>
                            <?php endforeach; ?>
                        </div>
                        <div class="area_data_chk">
                            <span class="data_chk_title">Mùa hay mắc bệnh</span>
                            <?php foreach ($season as $sea) : ?>
                            <span class="span_chk"><input type="checkbox" name="season_ids[]" value="<?php echo $sea['id']; ?>" <?php if (isset($season_ids[$sea['id']])) :?>checked="checked" <?php endif; ?> id="season_<?php echo $sea['id']; ?>" /><label for="season_<?php echo $sea['id']; ?>" class="label_for"><?php echo $sea['name']; ?></label></span>
                            <?php endforeach; ?>
                        </div>
                        <div class="area_data_chk">
                            <span class="data_chk_title">Gắn thẻ (tag) liên quan</span>
                            <?php foreach ($list_tag as $tag) : ?>
                            <span class="span_chk"><input type="checkbox" name="tag_id[]" value="<?php echo $tag->id; ?>" <?php if (isset($tag_ids[$tag->id])) :?>checked="checked" <?php endif; ?> id="tag_<?php echo $tag->id; ?>" /><label for="tag_<?php echo $tag->id; ?>" class="label_for"><?php echo $tag->name; ?></label></span>
                            <?php endforeach; ?>
                        </div>
                    </div>
                    <div class="active_div" id="tab_symptoms" style="padding-top: 0px !important">
                        <div class="form_block">
                            <div class="block_header">
                                Triệu chứng thường gặp
                            </div>
                            <div class="clearfix">
                                <ul id="symptoms_related" <?php if (!isset($symptoms_ids)) :?> style="display: none;" <?php endif; ?>>
                                    <?php if (isset($symptoms_ids)) :?>
                                    <?php foreach ($symptoms_ids as $symp) :?>
                                        <li id='li_symptoms_relate<?php echo $symp->id; ?>'><span title='Xóa khỏi danh sách liên quan' class='icon icon_delete' onclick='admin_medical_disease.remove_symptoms(<?php echo $symp->id; ?>)'></span><a target='_blank' href=''><?php echo $symp->name; ?></a><input type='hidden' name='data[symptoms_ids][]' value='<?php echo $symp->id; ?>' /></li>
                                    <?php endforeach; ?>
                                    <?php endif; ?>
                                </ul>
                            </div>
                            <div class="block_content" id="symptoms_relate_list">
                                <table class="gridview" width="100%" cellpadding="0" cellspacing="0" border="0">
                                    <thead>
                                    <tr>
                                        <td width="60px"><b>ID</b></td>
                                        <td width="200px"><b>Triệu chứng</b></td>
                                        <td width="180px"><b>Thuộc bộ phận</b></td>
                                        <td width="100px"><b>Ảnh minh họa</b></td>
                                        <td><b>Mô tả ngắn</b></td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="filters">
                                        <td colspan="5">
                                            <input placeholder="ID" type="text" class="small_filter" name="filters[symptoms][id]" title="Tìm kiếm theo id triệu chứng lâm sàng" value="<?php echo isset($filters['symptoms']['id']) ? $filters['symptoms']['id'] : '' ;?>" />
                                            <input placeholder="Tên" style="width: 180px;margin: 0 15px 0 10px;" type="text" class="small_filter" name="filters[symptoms][name]" title="Tìm kiếm theo triệu chứng lâm sàng" value="<?php echo isset($filters['symptoms']['name']) ? $filters['symptoms']['name'] : '' ; ?>" />

                                            <select name="filters[symptoms][parts_id]" id="parts_id" style="width: 180px;">

                                            </select>

                                            <button type="button" class="gray_btn" style="margin-left:10px;position:relative;top:2px"  onclick="return admin_medical_disease.filter_symptoms_related('symptoms_relate_list')">
                                                <span>Tìm</span>
                                            </button>
                                            &nbsp;
                                            <button type="button" class="gray_btn" style="position:relative;top:2px" onclick="return admin_medical_disease.reset_filter_symptoms('symptoms_relate_list')">
                                                <span>Xóa lọc</span>
                                            </button>
                                        </td>
                                    </tr>

                                    </tbody>

                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="active_div" id="tab_disease" style="padding-top: 0px !important">
                        <div class="form_block">
                            <div class="block_header">
                                Những bệnh liên quan
                            </div>
                            <div class="clearfix">
                                <ul class="disease_related" id="disease_related" <?php if (!isset($disease_ids)) :?> style="display: none;" <?php endif; ?>>
                                    <?php if (isset($disease_ids)) :?>
                                        <?php foreach ($disease_ids as $dis) :?>
                                        <li id='li_disease_relate<?php echo $dis->id; ?>'><span title='Xóa khỏi danh sách liên quan' class='icon icon_delete' onclick='admin_medical_disease.remove_related(<?php echo $dis->id; ?>)'></span><a target='_blank' href='#'><?php echo $dis->name; ?></a><input type='hidden' name='data[disease_ids][]' value='<?php echo $dis->id; ?>' /></li>
                                        <?php endforeach; ?>
                                    <?php endif; ?>
                                </ul>
                            </div>
                            <div class="block_content" id="disease_relate_list">
                                <table class="gridview" width="100%" cellpadding="0" cellspacing="0" border="0">
                                    <thead>
                                    <tr>
                                        <td width="60px"><b>ID</b></td>
                                        <td><b>Thông tin bệnh</b></td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="filters">
                                        <td colspan="2">
                                            <input placeholder="ID" type="text" class="bind_enter_evt small_filter" name="filters[disease][id]" title="Tìm kiếm theo id bệnh lý" onchange="return admin_cms_article.act_filter_related('filter_related_list', '', 1)" />
                                            <input placeholder="Tên bệnh" style="margin-right: 20px; width: 200px;" type="text"  name="filters[disease][name]" title="Tìm kiếm theo tên bệnh" />
                                            <select name="filters[disease][object]" title="Đối tượng hay mắc bệnh" style="width: 150px;">
                                                <option value="0">Chọn đối tượng</option>
                                                <?php foreach ($list_object as $object) : ?>
                                                <option value="<?php echo $object->id; ?>"><?php echo $object->name; ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                            <select name="filters[disease][department]" title="Bệnh thuộc khoa" style="width: 180px;">
                                                <option value="0">Thuộc khoa</option>
                                                <?php foreach ($department as $dep) : ?>
                                                <option value="<?php echo $dep->id; ?>"  <?php if ($dep->id == get_field($disease, 'department_id')) :?>selected="selected" <?php endif; ?> ><?php echo $dep->name; ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                            <select name="filters[disease][season]" title="Thời tiết thường gặp" style="width: 100px;">
                                                <option value="0">Thời tiết</option>
                                                <?php foreach ($season as $sea) : ?>
                                                <option value="<?php echo $sea['id']; ?>"  ><?php echo $sea['name']; ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                            <button class="gray_btn" type="button" onclick="return admin_medical_disease.filter_disease_related('disease_relate_list')">
                                                <span>Lọc</span>
                                            </button>
                                            <button class="gray_btn" type="button" onclick="return admin_medical_disease.reset_filter_related('disease_relate_list')">
                                                <span>Xóa lọc</span>
                                            </button>
                                        </td>
                                    </tr>

                                    </tbody>
                                    <tfoot>

                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>

                    <div class="active_div" id="tab_related" style="padding-top: 0px !important">
                        <div class="form_block">
                            <div class="block_header">
                                Chọn tin liên quan cho bài viết
                            </div>
                            <div class="clearfix">
                                <ul class="article_related" id="article_related">
                                    <?php if (isset($list_group_edit)) :?>
                                    <?php foreach ($list_group_edit as $group_edit) :?>
                                        <li id='related_id_<?php echo $group_edit['article_detail']->id; ?>'>
                                            <span title='Xóa khỏi danh sách liên quan' class='icon icon_delete' onclick='admin_cms_article.remove_related(<?php echo $group_edit['article_detail']->id; ?>)'></span>
                                            <span class='icon icon_preview' onclick='admin_cms_article.preview_article(<?php echo $group_edit['article_detail']->id; ?>)'></span>
                                            <select onchange="admin_cms_article.select_group_cat(this, this.value)" name="group_cat_<?php echo $group_edit['article_detail']->id; ?>" class="select_group_cat" id="group_cat_<?php echo $group_edit['article_detail']->id; ?>" style="width: 130px;">
                                                <option value="0">Thuộc nhóm</option>

                                                <?php foreach ($category_relate as $cat_relate) :?>
                                                <option value="<?php echo $cat_relate->id; ?>" <?php if ($cat_relate->id == $group_edit['cat_id']) :?> selected="selected" <?php endif; ?> ><?php echo $cat_relate->name; ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                            <a target='_blank' href='#' class="ml_10"><?php echo $group_edit['article_detail']->title; ?></a>
                                            <input type='hidden' class='group_cat_<?php echo $group_edit['article_detail']->id; ?>' name='data[category_article_ids][]' id='cat_article_<?php echo $group_edit['article_detail']->id; ?>' value='<?php echo $group_edit['article_detail']->id; ?>_<?php echo $group_edit['cat_id']; ?>' />
                                        </li>
                                    <?php endforeach; ?>
                                    <?php endif; ?>
                                </ul>
                            </div>
                            <div class="block_content" id="filter_related_list">
                                <table class="gridview" width="100%" cellpadding="0" cellspacing="0" border="0">
                                    <thead>
                                    <tr>
                                        <td><b>ID</b></td>
                                        <td><b>Chọn</b></td>
                                        <td colspan="3"><b>Tiêu đề</b></td>
                                        <td colspan="5"><b>Tiêu chí khác</b></td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr class="filters">
                                        <td colspan="2">
                                            <input placeholder="ID" type="text" class="bind_enter_evt small_filter" name="filters[ca.id][value]" title="Tìm kiếm theo id bài viết" onchange="return admin_cms_article.act_filter_related('filter_related_list', '', 1)" />
                                            <input type="hidden" value="equal" name="filters[ca.id][type]" />
                                        </td>
                                        <td colspan="2">
                                            <input placeholder="Từ khóa" type="text" class="bind_enter_evt wide_filter" name="filters[title][value]" title="Tìm kiếm theo tiêu đề bài viết" onchange="return admin_cms_article.act_filter_related('filter_related_list', '', 1)" />
                                            <input type="hidden" value="text" name="filters[title][type]" />
                                        </td>
                                        <td>
                                            <select style="width: 125px" onchange="return admin_cms_article.act_filter_related('filter_related_list', '', 1)" placeholder="Tất cả" name="filters[user_id][value]">
                                                <option value="-1">-- Tất cả --</option>
                                                <?php foreach ($users as $user) :?>
                                                <option value="<?php echo $user->id; ?>"><?php echo get_field($user, 'username'); ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                            <input type="hidden" value="equal" name="filters[user_id][type]" />
                                            <input type="hidden" value="-1" name="filters[user_id][exclude]" />
                                        </td>
                                        <td>
                                            <select style="width: 125px" onchange="return admin_cms_article.act_filter_related('filter_related_list', '', 1)" placeholder="Tất cả" name="filters[ca.category_ids][value]">
                                                <option value="-1">-- Tất cả --</option>
                                                <?php foreach ($categories as $cat) :?>
                                                <?php if (intval($cat->parent_id) > 0) :?>└--<?php endif; ?>
                                                <option <?php if (isset($filters['ca.category_ids']['value']) && intval($filters['ca.category_ids']['value']) == intval($cat->id)) :?>selected="selected"<?php endif; ?> value="<?php echo get_field($cat, 'id'); ?>"><?php echo get_field($cat, 'name'); ?></option>
                                                <?php endforeach; ?>
                                            </select>
                                            <input type="hidden" value="text" name="filters[ca.category_ids][type]" />
                                            <input type="hidden" value="-1" name="filters[ca.category_ids][exclude]" />
                                        </td>
                                        <td width="150px" colspan="2">
                                            <button class="gray_btn" type="button" onclick="return admin_cms_article.act_filter_related('filter_related_list', '', 1)">
                                                <span>Lọc</span>
                                            </button>
                                            <button class="gray_btn" type="button" onclick="return admin_cms_article.reset_filter_related('filter_related_list', '', 1)">
                                                <span>Xóa lọc</span>
                                            </button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="9" style="padding: 10px">
                                            <p align="center">Thực hiện chức năng lọc phía trên để tìm những tin liên quan đến bài viết</p>
                                        </td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="active_div" id="tab_image" style="padding-top: 0px !important">
                        <div class="form_block" id="container-upload" style="padding-top: 20px;">
                            <div class="block_content block_other_image" style="float: left;width: 50%; position: relative;min-height: 150px; padding-bottom: 10px;">
                                <span class="title_top_out ml_5">Ảnh liên quan</span>
                                <div class="add_other_image">
                                    <?php if (isset($other_image)) :?>
                                        <?php foreach ($other_image as $key => $v_i) :?>
                                        <div class="area_image_disease frm_field" id="area_image_disease_<?php echo $key; ?>">
                                            <div class="show_image" id="show_image_<?php echo $key; ?>">
                                                <img src="<?php echo render_src($v_i['image']); ?>" />
                                            </div>
                                            <div class="area_data_image" id="area_data_image_<?php echo $key; ?>">
                                                <p>
                                                    <input type="checkbox" <?php if (isset($v_i['is_original'])) :?>checked="checked" <?php endif; ?> name="data[other_image][image_<?php echo $key; ?>][is_original]" id="is_original_<?php echo $key; ?>"/><label for="is_original_<?php echo $key; ?>" class="label_for">Ảnh đại diện</label>
                                                    <a class="icon icon_delete" title="Xóa ảnh" href="javascript:;void(0);" style="float: right;margin-right: 20px;" onclick="admin_medical_disease.remove_image_other(<?php echo $key; ?>)"></a>
                                                </p>
                                                <p class="mb_10"><input type="text" name="data[other_image][image_<?php echo $key; ?>][title]" value="<?php echo $v_i['title']; ?>" placehoder="Tiêu đề ảnh" class="std_input" style="width: 90%" /></p>
                                                <p class="mb_10"><input type="text" name="data[other_image][image_<?php echo $key; ?>][description]" value="<?php echo $v_i['description']; ?>" placehoder="Mô tả ngắn cho ảnh" class="std_input" style="width: 90%" /></p>
                                                <input type="hidden" value="<?php echo $v_i['image']; ?>" name="data[other_image][image_<?php echo $key; ?>][image]" />
                                            </div>
                                        </div>
                                        <?php endforeach; ?>
                                    <?php endif; ?>
                                </div>
                                <a class="up_img_gallery upload_img_disease" id="upload_img_disease" href="javascript:;void(0)">Tải ảnh</a>
                                <p style="font-style:italic; font-size: 11px;color: #787878;margin-top: 21px;">Chấp nhận định dạng: JPG, PNG, JPGE</p>
                            </div>

                            <div class="block_content" style="float: left;width: 44%; margin-left: 10px;position: relative;min-height: 150px; padding-bottom: 10px;">
                                <span class="title_top_out ml_5">Video liên quan</span>
                                <?php if (isset($videos)) :?>
                                    <?php foreach ($videos as $k_v => $vid) :?>
                                    <div class="area_video_disease frm_field" id="area_video_<?php echo $k_v; ?>">
                                        <p class="mb_10">
                                            <strong>Tiêu đề: </strong><input type="text" name="data[video][<?php echo $k_v; ?>][title]" class="std_input ml_20" value="<?php echo $vid['title']; ?>" style="width: 300px;"/>
                                            <a class="icon icon_delete" title="Xóa video" href="javascript:;void(0);" style="float: right;margin-top: 5px" onclick="admin_medical_disease.remove_video(<?php echo $k_v; ?>)"></a>
                                        </p>
                                        <p class="mb_10"><strong>Mã nhúng: </strong><input type="text" name="data[video][<?php echo $k_v; ?>][embed]" class="std_input ml_6" value="<?php echo $vid['embed']; ?>" /></p>
                                        <p class="mb_10"><strong>Mô tả ngắn: </strong><input type="text" name="data[video][<?php echo $k_v; ?>][description]" class="std_input" value="<?php echo $vid['description']; ?>" /></p>
                                    </div>
                                    <?php endforeach; ?>
                                <?php else: ?>
                                    <div class="area_video_disease frm_field" id="area_video_1">
                                        <p class="mb_10">
                                            <strong>Tiêu đề: </strong><input type="text" name="data[video][1][title]" class="std_input ml_20" style="width: 300px;"/>
                                            <a class="icon icon_delete" title="Xóa video" href="javascript:;void(0);" style="float: right;margin-top: 5px" onclick="admin_medical_disease.remove_video(1)"></a>
                                        </p>
                                        <p class="mb_10"><strong>Mã nhúng: </strong><input type="text" name="data[video][1][embed]" class="std_input ml_6" /></p>
                                        <p class="mb_10"><strong>Mô tả ngắn: </strong><input type="text" name="data[video][1][description]" class="std_input" /></p>
                                    </div>
                                <?php endif; ?>

                                <a class="btn_a_border" onclick="admin_medical_disease.add_video()" href="javascript:;void(0)">Thêm video</a>
                            </div>
                        </div>
                    </div>
                    <div class="active_div" id="tab_seo" style="padding-top: 0px !important">
                        <div class="form_block">
                            <div class="block_header">
                                Thông tin SEO
                            </div>
                            <div class="block_content">
                                <table cellpadding="0px" cellspacing="0px">
                                    <tr>
                                        <td class="frm_label">Tiêu đề(*)</td>
                                        <td class="frm_field">
                                            <input type="text" name="data[meta_title]" value="<?php echo get_field($disease, 'meta_title'); ?>" class="std_input" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Từ khóa</td>
                                        <td class="frm_field">
                                            <input type="text" name="data[meta_keywords]" value="<?php echo get_field($disease, 'meta_keywords'); ?>" class="std_input" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="frm_label">Mô tả</td>
                                        <td class="frm_field">
                                            <input type="text" name="data[meta_description]" value="<?php echo get_field($disease, 'meta_description'); ?>" class="std_input" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="clearfix auto_height mb_10">
                    <button class="gray_btn " type="button" onclick="window.location = '<?php echo site_url('admin/medical/disease/index', true); ?>'"><span>Về danh sách</span></button>
                    <button class="gray_btn" type="submit" ><span>Lưu lại</span></button>
                    <button class="gray_btn" type="reset"><span>Nhập lại</span></button>
                    <?php if (isset($disease->id) && $has_privilege_delete) :?>
                    <button class="gray_btn delete_btn" type="button" action="<?php echo site_url('admin/medical/disease/delete/id/' . $disease->id, true); ?>" message="Bạn muốn xóa khoa này?" onclick="btn_util.active_delete(this)"><span>Xóa khoa</span></button>
                    <?php endif; ?>
                </div>
            </form>
        </div>
    </div>


<div class="clearfix"></div>

<div class="container_data_image_upload">
    <div class="area_image_disease frm_field" id="area_image_disease_INDEX">
        <div class="process_upload" id="process_upload_INDEX">
            <img src="<?php echo BASE_URL; ?>themes/standard/images/upload-loading.gif" height="12"/>
        </div>

        <div class="show_image" id="show_image_INDEX">
            <img id="img_view_INDEX" />
        </div>
        <div class="area_data_image" id="area_data_image_INDEX">
            <p>
                <input type="checkbox" name="data[other_image][image_INDEX][is_original]" id="is_original_INDEX"/><label for="is_original_INDEX" class="label_for">Ảnh đại diện</label>
                <a class="icon icon_delete" title="Xóa ảnh" href="javascript:;void(0);" style="float: right;margin-right: 20px;" onclick="admin_medical_disease.remove_image_other('INDEX')"></a>
            </p>
            <p class="mb_10"><input type="text" name="data[other_image][image_INDEX][title]" placehoder="Tiêu đề ảnh" class="std_input" style="width: 90%" /></p>
            <p class="mb_10"><input type="text" name="data[other_image][image_INDEX][description]" placehoder="Mô tả ngắn cho ảnh" class="std_input" style="width: 90%" /></p>
            <input type="hidden" name="data[other_image][image_INDEX][image]" id="image_val_INDEX" />
        </div>
    </div>
</div>


<script type="text/javascript" src="<?php echo BASE_URL; ?>js/admin/medical/object/function.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL; ?>js/admin/cms/article/function.js"></script>

<script type="text/javascript">
    var allParts = <?php echo $list_parts;?>;//lấy hết bộ phận cơ thẻ
    admin_medical_parts.showOptParts(allParts, 'parts_id', '');
    $("#frm_disease_edit").validate({
        errorLabelContainer: $("#form_error")
    });


    admin_medical_disease.uploadMulti('upload_img_disease');

</script>
